package com.astrocsr.security;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.springframework.security.core.Authentication;
import org.springframework.security.web.authentication.SimpleUrlAuthenticationSuccessHandler;

public class AuthenticationSuccessHandler extends
	SimpleUrlAuthenticationSuccessHandler {

	public AuthenticationSuccessHandler() {
	}

	public void onAuthenticationSuccess(HttpServletRequest request,
			HttpServletResponse response, Authentication authentication) {
		try {
			System.out.println("Catch Login Successfully");
			//setDefaultTargetUrl(defaultTargetUrl); // route login process
			super.onAuthenticationSuccess(request, response, authentication);
		} catch (Exception e) {
			e.printStackTrace();
		}
	}
}
